import request from '@/utils/request'
import { ApiModulesRoutes } from '@/consts.js'

/**
 * 通过查询条件分页查询人员列表
 * @param {Number} data.pageNo
 * @param {Number} data.pageSize
 * @param {String} data.keyword
 */

export function apiGetPersonList(data) {
  return request({
    url: `${ApiModulesRoutes.USER}/record/person/findRecordsPersonPageResultWithAccountControlLogByParam`,
    method: 'POST',
    data
  })
}


/**
 * 根据人员档案id批量拉黑
 * @param {Number} data 批量拉黑id
 */

export function apiPullBlackList(data) {
  return request({
    url: `${ApiModulesRoutes.USER}/record/person/pullRecordPersonIntoBlackList`,
    method: 'POST',
    data
  })
}


/**
 * 获取通行记录
 * @param {Number} data.black 是否是黑名单
 * @param {Number} data.personIds 人员
 */

export function apiGetAccessRecord(data) {
  return request({
    url: `${ApiModulesRoutes.BASE}/accessControl/findAccessControlLogPageByParams`,
    method: 'POST',
    data
  })
}


/**
 * 通过查询条件分页查询车辆档案
 * @param {Number} data.pageNo
 * @param {Number} data.pageSize
 * @param {String} data.keyword
 */

export function apiGetCardList(data) {
  return request({
    url: `${ApiModulesRoutes.USER}/record/car/findRecordsCarPageWithAccountControlLogByParam`,
    method: 'POST',
    data
  })
}



/**
 * 根据人员档案id批量拉黑
 * @param {Number} data 批量拉黑id
 */

export function apiPullCarBlackList(data) {
  return request({
    url: `${ApiModulesRoutes.USER}/record/car/pullBlackCarByIds`,
    method: 'POST',
    data
  })
}
